package com.hibay.goldking.ui.viewmodel

import androidx.lifecycle.MutableLiveData
import com.hibay.goldking.base.BaseViewModel
import com.hibay.goldking.bean.UserInfo
import com.hibay.goldking.net.RetrofitClient


/**
 *
 *
 * @author chenchao
 * @date 4/22/21 09:53
 */
class LoginViewModel : BaseViewModel() {

    val loginResult = MutableLiveData<UserInfo>()
    fun login(name: String, pwd: String) {
        launch({
            isShowLoadding.value = true
            loginResult.value =
                RetrofitClient.apiService.login(name, pwd).apiData()
        })
    }
}